package com.donn.securitycontrolplatform.personinfo.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dahuatech.icc.exception.ClientException;
import com.donn.securitycontrolplatform.common.Result;
import com.donn.securitycontrolplatform.expection.BusinessException;
import com.donn.securitycontrolplatform.personinfo.entity.PersonInfo;


/**
 * <p>
 * LOC 用户 服务类
 * </p>
 *
 * @author zhenglx
 * @since 2022-06-23
 */
public interface IPersonInfoService extends IService<PersonInfo> {


    /**
     * 通过名称和身份证号码获取指定用户
     *
     * @param name
     * @param idNo
     */
    PersonInfo getPersonByNameAndIdNo(String name, String idNo);

    /**
     * 分页获取人员列表
     *
     * @param page
     * @return
     */
    Result getPage(Page<PersonInfo> page);

    /**
     * 添加人员
     *
     * @param personInfo
     * @return
     */
    Result add(PersonInfo personInfo) throws BusinessException, ClientException;

    /**
     * 编辑人员
     *
     * @param personInfoDTO
     * @return
     */
    Result updatePerson(PersonInfo personInfoDTO) throws BusinessException, ClientException;

    /**
     * 删除人员
     *
     * @param personId
     * @return
     */
    Result deletePerson(Integer personId) throws BusinessException, ClientException;
}
